def main():
    tasks = list(map(int, input().split(',')))
    
    index_dict = [[i,v,0] for i, v in enumerate(tasks)]
    sorted_index = sorted(index_dict, key=lambda x: -x[1])
    for i in range(len(sorted_index)):
        sorted_index[i][2] = i
    sorted_index = sorted(sorted_index, key=lambda x: x[0])
    
    ans = [item[2] for item in sorted_index]
    print(",".join(map(str, ans)))

if __name__ == "__main__":
    main()